package com.ternnetwork.core.entity.log;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ternnetwork.core.entity.User;



@Entity
@Table(name="VS_USER_PW_RESET_LOG")
public class UserPasswordResetLog implements Serializable{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4474682021812723888L;

	@Id@Column(name="ID",nullable=false)
	@GeneratedValue(strategy = GenerationType.TABLE,generator="id_gen")
    @TableGenerator(name = "id_gen",pkColumnValue="USER_PASSWORD_RESET_LOG_ID",table="VS_ID_GENERATOR", pkColumnName="GEN_NAME",valueColumnName="GEN_VALUE",allocationSize=1)
	private Long id;
	
	@ManyToOne(fetch=FetchType.EAGER)@JoinColumn(name="USER_ID")
	private User user;
	
	@Column(nullable=false,name="RESET_PASSWORD")
	private String resetPassword;
	
	
	@Column(name="EMAIL_SEND_BATCH_NO")
	private String emailSendBatchNo;
	
	@Column(name="SMS_SEND_BATCH_NO")
	private String smsSendBatchNo;
	
	
	@Temporal(TemporalType.TIMESTAMP)@Column(nullable=false,name="CREATE_TIME")
	private Date createTime=new Date();
	
	@Temporal(TemporalType.TIMESTAMP)@Column(name="UPDATE_TIME")
	private Date updateTime;
	
	@Temporal(TemporalType.TIMESTAMP)@Column(name="EMAIL_SEND_TIME")
	private Date emailSendTime;
	
	@Temporal(TemporalType.TIMESTAMP)@Column(name="SMS_SEND_TIME")
	private Date smsSendTime;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getResetPassword() {
		return resetPassword;
	}

	public void setResetPassword(String resetPassword) {
		this.resetPassword = resetPassword;
	}

	

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	

	public Date getSmsSendTime() {
		return smsSendTime;
	}

	public void setSmsSendTime(Date smsSendTime) {
		this.smsSendTime = smsSendTime;
	}

	public String getEmailSendBatchNo() {
		return emailSendBatchNo;
	}

	public void setEmailSendBatchNo(String emailSendBatchNo) {
		this.emailSendBatchNo = emailSendBatchNo;
	}

	public String getSmsSendBatchNo() {
		return smsSendBatchNo;
	}

	public void setSmsSendBatchNo(String smsSendBatchNo) {
		this.smsSendBatchNo = smsSendBatchNo;
	}

	

	public Date getEmailSendTime() {
		return emailSendTime;
	}

	public void setEmailSendTime(Date emailSendTime) {
		this.emailSendTime = emailSendTime;
	}

	
	
	

}
